This invention relates to data processing system using block erasing type memory device, block erasing type memory device and computer readable program memory medium storing program for formatting, data erasing and date write for block erasing type memory device.
Recently, a flash memory has been used as a portable nonvolatile memory medium instead of a floppy disk, particularly as a memory medium for a mobile information terminal. The flash memory mentioned herein refers to a nonvolatile block erasing type memory device comprising a plurality of blocks, in which data stored internally can be electrically erased by each block.
When the flash memory is used under a control of such a disk operating system as MS-DOS (Microsoft""s trademark), it is formatted according to the same format as that used conventionally for the floppy disk so as to handle it in the same way as the floppy disk. According to this format, a memory area is divided to boot area, FAT (file allocation table) area, directory area and data area. The data area is logically divided to clusters according to a definition stored in the boot area and a file to be stored in the flash memory is memorized in units of one cluster.
However, in the format of the conventional flash memory, the position of the cluster does not coincide with that of a block.
Therefore, if it is intended to update data (file) stored in a cluster, data (file) not necessary to update is also erased in units of a block altogether. Thus, the data not necessary to update must be saved in other cluster.
The same problem occurs when data (file) is written into a flash memory.
Further, if erasing or write-in of data is executed, FAT or directory must be rewritten, so that correspondingly the data not necessary to erase must be saved in other block.
Therefore, in order to update a single file in a conventional block erasing type memory device, plural blocks must be updated even if it is data within one block. For the reason, data write processing is divided to two parts so that it takes a long time, thereby often leading to deceleration of the entire memory device operation.
The same problem occurs when data (file) is written into the flash memory.
Further, if erasing or write-in of data is executed, FAT or directory must be rewritten, so that correspondingly the data not necessary to erase must be saved in other block.
This problem becomes more conceivable when data processing unit such as CPU controls the block erasing type memory device through a direct access thereto without using a special controller for reduction of the size and power consumption of the memory device.
An object of the present invention is to accelerate data access, particularly processing including data erasing in the block erasing type memory device.
Another object of the invention is to provide a block erasing type memory device having a format structure capable of achieving data write-in processing rapidly and making the best use of the storage capacity, data processing system using the same memory medium and a program memory medium storing a program for formatting of the block erasing type memory device, data erasing and data write-in.
According to a first aspect of the present invention, there is provided data processing system comprising a block erasing type memory device including a plurality of blocks, capable of erasing stored data collectively in units of one block and data processing means for accessing the block erasing type memory device, wherein the data processing means includes a formatting portion connected to the block erasing type memory device for formatting the block erasing type memory device according to formatting information for substantially coinciding the size and position of a cluster as a logical unit of a memory region of the block erasing type memory device with those of integer ones of the blocks, and an access control portion for determining the size and position of the cluster according to the format information and carrying out access control for data erasing, data write-in and data read-out for the block erasing type memory device according to the determined size and position of the cluster.
In this data processing system, a cluster includes integer ones of the blocks. Thus, data erasing and write-in processing can be carried out in units of one block. Thus, the necessity of saving other data for data write-in or erasing is eliminated, so that the data erasing and write-in processing can be carried out rapidly.
According to a second aspect of the present invention, there is provided a block erasing type memory device having a format information memory region for storing format information for making integer ones substantially correspond to a cluster serving as a unit of data memory region and capable of erasing stored data collectively in units of one block.
In this block erasing type memory device, the cluster includes integer ones. Thus, data erasing and write-in processing can be carried out in units of one block. Thus, the necessity of saving other data for data write-in is eliminated, so that the data erasing and write-in processing can be carried out rapidly.
Although ordinarily, the cluster has a single block, it may be formed of a plurality of the blocks.
The format information comprises information for corresponding the size of the cluster with the size of the block and a position adjusting region for coinciding a start position and end position of each of the clusters with the start position and end position of the block, for example, an empty region.
The block erasing type memory device may store directory information indicating a file name and head memory position and a file allocation table indicating a file position in a single cluster.
When data is stored in a memory medium, ordinarily it is necessary to memorize position information (e.g., file allocation table) indicating which position each data is stored and identification name (e.g., file name and directory) of each data. This position information and identification name must be updated each time when data write-in or erasing is carried out. In the above block erasing type memory device, the position information and identification name are stored in a single cluster or a single block. Therefore, the necessity of saving other data for updating these data is eliminated. Thus, the data write-in or erase processing can be carried out rapidly.
It is preferred that stored data of blocks other than the aforementioned block including the block for storing the format information is physically erased.
In general memory medium, it is possible to consider that data has been erased by replacing a particular portion of the data (e.g., head one character) with a specific code, without physically erasing data stored in the data region (e.g., erasing by writing data corresponding to xe2x80x9c1xe2x80x9d).
However, in the block erasing type memory device like the flash memory, by such data erasing method, new data cannot be written over the erased data, so that the processing for saving the original data and erasing its appropriate area is required.
Because according to the present invention, in other regions than such particular regions as boot region and FAT region and the like, data has been erased, saving of data and erasing upon write-in processing become unnecessary, so that the write-in processing can be accelerated.
According to a third aspect of the present invention, there is provided data processing system comprising a connecting portion containing a plurality of blocks and so constructed to be connectable to a block erasing type memory device capable of erasing collectively stored data in units of one block and a formatting portion for formatting the block erasing type memory device by writing format information for substantially coinciding integer ones of the blocks, for example, one block with a cluster into the block erasing type memory device through the connecting portion.
According to this system, the cluster includes integer ones of the blocks. Thus, the data erasing and write-in processings can be carried out in units of one block. Therefore, the necessity of saving other data for data write-in processing is eliminated, so that the data erasing and write-in processing can be accelerated.
To correspond the cluster with the block, it is permissible to write information for corresponding the size of the cluster with the size of the block and position adjusting information for coinciding the start position and end position of each cluster with the start position and end position of each block into the block erasing type memory device.
The aforementioned data processing system may further comprise a section for recording directory information indicating a file name and head memory position and a file allocation table indicating a file positioning a cluster.
These information items are updated each time when data write-in or erase processing is carried out. Because in such a system, these information items are stored in a single block, the necessity of saving other data for updating these data is eliminated. Thus, the data write-in or erase processing can be accelerated.
The aforementioned formatting portion may include an erasing portion for physically erasing stored data of blocks other than a block in which the format information is written.
In general memory medium, it is possible to assume that data has been erased by replacing a particular portion of data with a particular code, without physically erasing data.
However, in the block erasing type memory device, according to such data erasing method, a processing for erasing the original data or the like is needed at the time of data write-in processing, so that the processing takes long time. Because according to the present invention, data in the data region is physically erased upon formatting, the write-in processing can be accelerated.
In erasing a file written in the block erasing type memory device also, it is preferable that data of a block including that appropriate data is physically erased.
The aforementioned data processing system further comprises a format information readout portion for reading out the format information through the connecting portion, a cluster determining portion for determining a size and position of a cluster serving as a minimum unit of a file according to format information read out by the format information readout portion and a control portion for controlling erasing, write-in and readout of data of the block erasing type memory device according to the size and position of a cluster determined by the cluster determining means.
With such components, the data erasing, write-in processing and the like can be accelerated.
A program for making the computer to execute the above described data processing system and function may be stored in a memory medium and distributed, and installed in the computer so as to carry out the above described operation on the computer.
Additional objects and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The objects and advantages of the invention may be realized and obtained by means of the instrumentalities and combinations particularly pointed out hereinafter.